#pragma once
#include "stdafx.h"

using namespace std;

struct symbol{
	string name,type,kind;
	int index;
};

class SymbolTable
{
	symbol symTab[SYM_MAX];
public:
	int size, staticCount, fieldCount, argCount, varCount;
	SymbolTable();
	void define(string, string, string);
	void startnewSubroutine();
	bool searchSymbol(string name);
	void writePushPop(string name, fstream& stream, bool isPush);
	string typeOf(string name);
};

